"""
图形识别系统核心模块
"""

from .shape_detector import ShapeDetector
from .password_lock import PasswordLock
from .utils import (
    draw_contours,
    calculate_shape_properties,
    create_demo_images,
    resize_image,
    enhance_image_contrast,
    remove_noise,
    get_shape_color,
    draw_detection_info,
    validate_image_format,
    save_detection_result,
    create_shape_template,
    calculate_detection_accuracy
)

__version__ = "1.0.0"
__author__ = "Shapes Recognizer Team"
__description__ = "基于OpenCV的图形识别系统"

# 导出主要类和函数
__all__ = [
    # 主要类
    "ShapeDetector",
    "PasswordLock",
    
    # 工具函数
    "draw_contours",
    "calculate_shape_properties", 
    "create_demo_images",
    "resize_image",
    "enhance_image_contrast",
    "remove_noise",
    "get_shape_color",
    "draw_detection_info",
    "validate_image_format",
    "save_detection_result",
    "create_shape_template",
    "calculate_detection_accuracy",
    
    # 版本信息
    "__version__",
    "__author__",
    "__description__"
]

def get_version():
    """获取版本信息"""
    return __version__

def get_supported_shapes():
    """获取支持的图形类型"""
    return ["circle", "triangle", "square", "rectangle"]

def get_system_info():
    """获取系统信息"""
    import cv2
    import numpy as np
    import sys
    
    return {
        "version": __version__,
        "python_version": sys.version,
        "opencv_version": cv2.__version__,
        "numpy_version": np.__version__,
        "supported_shapes": get_supported_shapes()
    }